package com.zhenhao.xsq.ui.activity.home.module;

import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.home.HomeActivity;
import com.zhenhao.xsq.ui.activity.home.contract.HomeContract;
import com.zhenhao.xsq.ui.activity.home.presenter.HomePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author William
 * @Package com.cxwl.xlxgj.ui.activity.patrol
 * @Description: The moduele of PatrolRecordActivity, provide field for PatrolRecordActivity
 * @date 2019/04/17 14:23:19
 */
@Module
public class HomeModule {
    private final HomeContract.View mView;


    public HomeModule(HomeContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public HomePresenter provideHomePresenter(HttpAPIWrapper httpAPIWrapper, HomeActivity mActivity) {
        return new HomePresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public HomeActivity provideHomeActivity() {
        return (HomeActivity) mView;
    }
}